using UnityEngine;
using System.Collections;

public class Textures1 : MonoBehaviour {
public Texture[] tex = new Texture[23];
public  GameObject[] obj= new GameObject[18];
//static int index = 0;
	// Use this for initialization
	void Start () {
/*		obj[0] = GameObject.Find("1");
		obj[1] = GameObject.Find("2");
		obj[2] = GameObject.Find("3");
*/	}
	
	// Update is called once per frame
	void Update () {
/*		if (Input.GetKeyDown(KeyCode.Space))
		{
			index++;
			print("SPACE");
		}
*/		for (int i = 0; i != 18; ++i)
			obj[i].renderer.material.mainTexture = tex[i];
/*		obj[0].renderer.material.mainTexture = tex[0];
		obj[1].renderer.material.mainTexture = tex[1];
		obj[2].renderer.material.mainTexture = tex[2];
		obj[3].renderer.material.mainTexture = tex[3];	
		obj[4].renderer.material.mainTexture = tex[4];
		obj[5].renderer.material.mainTexture = tex[5];
		obj[6].renderer.material.mainTexture = tex[6];
		obj[7].renderer.material.mainTexture = tex[7];		
		print("tex");*/
/*		obj[1].renderer.material.mainTexture = tex[index+1];
		obj[2].renderer.material.mainTexture = tex[index+2];
		obj[3].renderer.material.mainTexture = tex[index+3];
		obj[4].renderer.material.mainTexture = tex[index+4];
		obj[5].renderer.material.mainTexture = tex[index+5];
*/	}
}
